package com.thkj.business.banner.service.impl;

import com.thkj.business.banner.entity.TblBanner;
import dp.dao.PagingList;
import com.thkj.framework.base.BaseService;
import com.thkj.business.banner.service.TblBannerService;

import java.util.Map;

import org.springframework.stereotype.Service;

@Service
public class TblBannerServiceImpl extends BaseService implements TblBannerService {
    public void insertTblBanner(TblBanner t){
        dao.insert("com.thkj.mapper.TblBanner.insert", t);
    }

    public int updateTblBanner(TblBanner t){
        int row = dao.update("com.thkj.mapper.TblBanner.update", t);
        return row;
    }

    public int deleteTblBanner(String t ){
        return dao.delete("com.thkj.mapper.TblBanner.delete", t);
    }

    public TblBanner getTblBannerById(String t){
        return dao.queryForObject("com.thkj.mapper.TblBanner.getById", t, TblBanner.class);
    }
    
    public PagingList<TblBanner> query(int pageIndex, int pageSize, Map<String, Object> param) {
		return dao.queryForPagingList("com.thkj.mapper.TblBanner.query",param, pageIndex, pageSize, TblBanner.class);
	}

}